package com.fare.taluo.core.domain.crawl;

import java.util.Date;
import java.util.List;

import com.dayatang.domain.EntityRepository;
import com.fare.taluo.core.domain.crawl.statistics.StatisticsTotalDetailEntity;
import com.fare.taluo.core.domain.crawl.statistics.StatisticsTotalEntity;

public interface TaskQueueLogEntityRepository extends EntityRepository {
	List<TaskQueueLogEntity> getTaskRecordList(String fromCityOrg,String toCityOrg, String grabChannel,Date startTime,Date endTime,String status,String sortorder,String sortname,int page,int pagesize);
	
	 TaskQueueLogEntity getTaskRecordByCondition(String fromCityOrg,String toCityOrg,Date startTime,Date endTime,String status);
	
	public List<TaskQueueLogEntity> getTaskRecordByGDate(Date beginTime,Date endTime,String grabchannel,String status);
	
	int getTotalTaskRecordListByCodition(String fromCityOrg,String toCityOrg, String grabChannel,Date startTime,Date endTime,String status);

	List<TaskQueueLogEntity> getTaskRecordByNowDate(Date nowDate);
	
	//引擎统计
	List<TaskQueueLogEntity> getTaskRecordByDateAndChannel(Date grabdate,String grabchannel,String status,int page,int pagesize);
	//total  
	List<TaskQueueLogEntity> getTotalRecordByDateAndChannel(Date grabdate,String grabchannel,String status,String fromCity,String toCity,int page,int pagesize);
	//引擎统计——总数 
//	List<StatisticsTotalDetailEntity> getTotalAllByFromAndTo(Date grabdate,String grabchannel,String fromCity,String toCity,int page,int pagesize);
	List<StatisticsTotalDetailEntity> getTotalAllByFromAndTo(String grabdate,String grabchannel,String fromCity,String toCity);
	int getTotalCountByFromAndTo(Date grabdate,String grabchannel,String fromCity, String toCity);
	
	List<StatisticsTotalEntity> getTotalRecordByDateAndChannel(String grabdate,String grabchannel);
	// total  
	int getTotalCountByDateAndChannel(Date grabdate,String grabchannel,String status,String fromCity, String toCity);
	//total fail 
	int getTotalAndFailCountByDateAndChannel(Date grabdate,String grabchannel,String fromCity, String toCity);
	
	List<TaskQueueLogEntity> getTotalAndFailRecordByDateAndChannel(Date grabdate,String grabchannel,String fromCity, String toCity,int page,int pagesize);
	
	int getCountByDateAndChannel(Date grabdate,String grabchannel,String status);
	int getCountByDateAndChannel_2(String grabdate,String grabchannel);//fangjq修改
	
	//持久化数据处理(查询出需要处理的数据)
	public List<TaskQueueLogEntity> getAllDatasByGrabDate(Date grabDate,Date endGrabDate);
}
